<template>
	<div class="w1024-wrap">
		<div class="page">
			<p class="page-title">操作记录</p>
			<template v-if="list.length">
				<div class="table-wrap">
					<el-table v-loading="loading" border ref="table" size="middle" :data="list" style="width: 100%">
						
						<el-table-column label="序号" min-width="20">
							<template slot-scope="scope">
								{{(searchData.pagenow-1)*10+scope.$index+1}}
							</template>
						</el-table-column>
						<el-table-column prop="phonestatusdesc" min-width="100" label="内容"></el-table-column>
						<el-table-column prop="updatetime" min-width="40" label="时间"></el-table-column>
					</el-table>
				</div>
				<el-pagination
				:current-page="this.searchData.pagenow"
				class="text-center"
				  layout="prev, pager, next,sizes"
				  prev-text="上一页"
				  next-text="下一页"
				  @size-change="pageSizeChange"
				  @current-change="currentPageChange"
				  :total="totalCount">
				</el-pagination>
			</template>
			<no-data v-if="!loading&&!list.length" text="暂无操作记录"></no-data>
			<div class="btn-wrap flex flex-align-center flex-justify-center">
				<el-button @click="back" size="medium" type="primary">返回</el-button>
			</div>
		</div>
	</div>
</template>

<script>
	import NoData from '@/components/NoData'
	export default{
		name:'OperateHistory',
		components:{
			NoData,
		},
		data(){
			return{
				loading:false,
				searchData:{
					pagenow:1,
					shownum:10,
					circlecommonuid:this.$route.params.circlecommonuid,
					hangupmemberid:this.$route.params.hangupmemberid,
				},
				totalCount:0,
				list:[]
			}
		},
		mounted(){
			this.getData()
		},
		methods:{
			pageSizeChange(pageSize) {
				this.searchData.shownum = pageSize
				this.getData()
			},
			currentPageChange(page) {
				this.searchData.pagenow = page
				this.getData()
			},
			getData(){
				this.loading=true
				this.$request.queryOperateHistory(this.searchData)
				.then(res=>{
					if(res.code==0){
						this.list=res.memberrecordlist
						this.totalCount=res.page.totalresult
					}else{
						this.msgError(res.msg)
					}
					this.loading=false
				})
			},
			back(){
				this.$router.go(-1)
			}
		}
	}
</script>

<style scoped lang="scss">
	.page{
		padding-left: 20px;
		padding-right: 20px;
		.page-title {
			height: 79px;
			line-height: 78px;
			color: #333;
			font-size: 18px;
			padding-left: 10px;
			font-weight: bold;
			border-bottom: 1px solid #eee;
		}
		.table-wrap{
			margin: 30px 92px 0;
			padding: 0;
			height: auto;
			>>>.el-table{
				.cell{
					text-align: center;
				}
			}
		}
	}
</style>